require("core.util")
local stronger_explosives_3_icon = "__base__/graphics/technology/stronger-explosives-3.png"
local energy_weapons_damage_3_icon = "__base__/graphics/technology/energy-weapons-damage.png"
local refined_flammables_icon = "__base__/graphics/technology/refined-flammables.png"
local physical_projectile_damage_2_icon = "__base__/graphics/technology/physical-projectile-damage-2.png"

--科技修改

--通过直接修改科技的方式修改伤害
data:extend(
    {
        {
            type = "technology",
            name = "stronger-explosives-7",
            icon_size = 256,
            icon_mipmaps = 4,
            icons = util.technology_icon_constant_damage(stronger_explosives_3_icon),
            effects = {
                {
                    type = "ammo-damage",
                    ammo_category = "rocket",
                    modifier = 6000000000
                },
                {
                    type = "ammo-damage",
                    ammo_category = "grenade",
                    modifier = 6000000000
                },
                {
                    type = "ammo-damage",
                    ammo_category = "landmine",
                    modifier = 6000000000
                }
            },
            prerequisites = {"stronger-explosives-6", "space-science-pack"},
            unit = {
                count_formula = "1",
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            max_level = "infinite",
            upgrade = true,
            order = "e-l-f"
        },
        {
            type = "technology",
            name = "energy-weapons-damage-7",
            icon_size = 256,
            icon_mipmaps = 4,
            icons = util.technology_icon_constant_damage(energy_weapons_damage_3_icon),
            effects = {
                {
                    type = "ammo-damage",
                    ammo_category = "laser",
                    modifier = 6000000000
                },
                {
                    type = "ammo-damage",
                    ammo_category = "beam",
                    modifier = 6000000000
                }
            },
            prerequisites = {"energy-weapons-damage-6", "space-science-pack"},
            unit = {
                count_formula = "1",
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            max_level = "infinite",
            upgrade = true,
            order = "e-l-f"
        },
        {
            type = "technology",
            name = "refined-flammables-7",
            icon_size = 256,
            icon_mipmaps = 4,
            icons = util.technology_icon_constant_damage(refined_flammables_icon),
            effects = {
                {
                    type = "ammo-damage",
                    ammo_category = "flamethrower",
                    modifier = 6000000000
                },
                {
                    type = "turret-attack",
                    turret_id = "flamethrower-turret",
                    modifier = 6000000000
                }
            },
            prerequisites = {"refined-flammables-6", "space-science-pack"},
            unit = {
                count_formula = "1",
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            max_level = "infinite",
            upgrade = true,
            order = "e-l-f"
        },
        {
            type = "technology",
            name = "physical-projectile-damage-7",
            icon_size = 256,
            icon_mipmaps = 4,
            icons = util.technology_icon_constant_damage(physical_projectile_damage_2_icon),
            effects = {
                {
                    type = "ammo-damage",
                    ammo_category = "bullet",
                    modifier = 6000000000
                },
                {
                    type = "turret-attack",
                    turret_id = "gun-turret",
                    modifier = 6000000000
                },
                {
                    type = "ammo-damage",
                    ammo_category = "shotgun-shell",
                    modifier = 6000000000
                },
                {
                    type = "ammo-damage",
                    ammo_category = "cannon-shell",
                    modifier = 6000000000
                }
            },
            prerequisites = {"physical-projectile-damage-6", "space-science-pack"},
            unit = {
                count_formula = "1",
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            max_level = "infinite",
            upgrade = true,
            order = "e-l-f"
        },
        {
            type = "technology",
            name = "laser-shooting-speed-8",
            icons = util.technology_icon_constant_speed("__base__/graphics/technology/energy-weapons-damage.png"),
            icon_size = 256,
            effects = {
                {
                    type = "gun-speed",
                    ammo_category = "laser",
                    modifier = 20
                }
            },
            prerequisites = {"laser-shooting-speed-7"},
            unit = {
                count_formula = "1",
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            max_level = "infinite",
            upgrade = true,
            order = "e-n-n"
        },
        {
            type = "technology",
            name = "inserter-capacity-bonus-7",
            icons = util.technology_icon_constant_stack_size("__base__/graphics/technology/inserter-capacity.png"),
            icon_size = 256,
            icon_mipmaps = 4,
            effects = {
                {
                    type = "inserter-stack-size-bonus",
                    modifier = 10 -- result of 3
                },
                {
                    type = "stack-inserter-capacity-bonus",
                    modifier = 250 -- result of 12
                }
            },
            prerequisites = {"inserter-capacity-bonus-6"},
            unit = {
                count = 1,
                ingredients = {
                    {"automation-science-pack", 1}
                },
                time = 1
            },
            upgrade = true,
            order = "c-o-h"
        }
    }
)
